package net.finnigin.process;

import java.util.EventObject;

public class ProcessEvent extends EventObject {

    /**
     * 
     */
    private static final long serialVersionUID = -9169853643590577053L;
    private long timestamp;
    private ProcessState state;

    public ProcessEvent(RunnableProcess source, ProcessState state) {
        super(source);
        this.timestamp = System.currentTimeMillis();
        this.state = state;
    }

    @Override
    public RunnableProcess getSource() {
        return (RunnableProcess) source;
    }

    public ProcessState getState() {
        return state;
    }

    public long getTimestamp() {
        return timestamp;
    }
}
